From: bors Date: Sat, 24 Feb 2018 19:34:52 +0000 (+0000) Subject: Auto merge of #5061 - ehuss:git-error-auth, r=alexcrichton X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~86 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=f75f403ed1452ae3aa79175e0a3eb36b2200c739;p=cargo.git Auto merge of #5061 - ehuss:git-error-auth, r=alexcrichton Display git errors during authentication. Certain git errors during authentication were being converted to internal errors which meant that they are only seen if you pass `--verbose`. This may not be obvious, and many of these messages are helpful for diagnosing git errors. This change makes these errors always be displayed. Fixes #5035. Note: Some of the git errors are currently unhelpful. Once Cargo has updated git2-rs to include alexcrichton/git2-rs#298, these errors will improve. (@alexcrichton, I can make a PR to update Cargo for the changes in git2 if you'd like). I'm uncertain if this is a good solution, since the error messages in some cases are a little verbose (such as showing `class=...`). Here is a sample of what some of the messages look like:
Error Message Examples

Example of the git message shown below the "attempted yadda yadda" message. Scenario | Message ---------|-------- No ssh-agent, multiple usernames | `error authenticating: ; class=Ssh (23)` | | †`error authenticating: no auth sock variable; class=Ssh (23)` No ssh-agent, one username | `an unknown git error occurred` | | †`error authenticating: no auth sock variable; class=Ssh (23)` Incorrect ssh-agent setup | `error authenticating: failed connecting with agent; class=Ssh (23)` ssh-agent no keys, one username | `an unknown git error occurred` | | †`failed to acquire username/password from local configuration` ssh-agent no keys, multiple usernames | `error authenticating: ; class=Ssh (23)` | | †`no authentication available` auth success, bad path | `fatal: '/path/to/repo/' does not appear to be a git repository; class=Ssh (23); code=Eof (-20)` | | ‡`ERROR: Repository not found.; class=Ssh (23); code=Eof (-20)` bad username | `an unknown git error occurred` | | †`failed to acquire username/password from local configuration` | | ‡`error authenticating: Username/PublicKey combination invalid; class=Ssh (23)` † - Messages once git2-rs is updated. ‡ - Github message

--- f75f403ed1452ae3aa79175e0a3eb36b2200c739